package com.tbit.main.service.impl;

import com.tbit.main.constant.DaoParamConstant;
import com.tbit.main.dao.data.WeatherHistoryDao;
import com.tbit.main.service.WeatherHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author LMY
 * @create 2021-06-04 16:30
 */
@Service("/weatherHistoryService")
public class WeatherHistoryServiceImpl implements WeatherHistoryService {

    @Autowired
    private WeatherHistoryDao weatherHistoryDao;

    @Override
    public List<Map<String, Object>> getGroupByDay(Integer accountId, String statDate, String endDate) {
        Map<String, Object> params = new HashMap<String, Object>();
        params.put(DaoParamConstant.accountId, accountId);
        params.put("statDate", statDate);
        params.put("endDate", endDate);

        return weatherHistoryDao.getGroupByDay(params);
    }
}
